
package org.wlgzs.shop.config;

import java.io.FileWriter;
import java.io.IOException;


public class AlipayConfig {

    // 应用ID,您的APPID，收款账号既是您的APPID对应支付宝账号
	public static String app_id = "2016093000634919";

    // 商户私钥，您的PKCS8格式RSA2私钥
    public static String merchant_private_key = "MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQCb5w6hULNClbBz7K3+oCKRBS3Xq5jmc9Faa4awIr/KthLDWFkYaY4Xnib9pcEldxbmiLdLZ56o5J58RXRM0tVnPPcYMq8ONp9Lk7nchHVxIQp+PicLBvpFbXQSxz+RiMZ9Nl6QF/5hhU+fw+SIkYKSdi64SXgUkuRugEsAF8J8/3/uSMl/mcZS16Enk8W1h3wEKMnZ8lqfSKNYTnEZpycuYzperqWxmLEtdH3YrNjd6ZL8fVw1a0R4MYHKBGf/s8TWTzoAbRb39cHVXSu42fMTtD+FyBjR97T78Pwi0JfUjg9/pt352l+Y6GC8n8vT/E/JlO8/5BXTqV/0r80oneR1AgMBAAECggEAWRZ+C7yb0y7KuFPFUb2cQxacjaOnKfmA5pSPUNNqmaHVsv8nWoXnBqP/T+6KIqic03vIkjRSO9z4m7bssIHCJM53vMIpuouIF54BFXwzyEPDRUSq9ugz17ymGZz2PGnWUvLgsqKjYILXb0p3q3rLDHqwU+rXzZnrIyH4ucLaBqbttgTRatuSo8C5YdprSLwgwtTBU/S2H4z5FVJc++vq6W6T6sRPHIy7RsBi4a+UaJS6BMuz9k3fcbgC01ywD0MRkXH0cKzL83G9KyihE+wEbBwr/WbyUuPKbjpcsSaCKNxOVYhPKYNKraD4MWDnp00Cqxw1t8lSCRo4g/Cb7v9+eQKBgQDOpWIl1YYZBBrdqjU0I9tXH8s+tqJig5awQI6CR4N60PwdIcY4xoPJh00uEYy2yU2LzV3suP1z6nKOOADWFWEjcAuUxo96dEP9Z1BGG1Gts4x9TzEKnIT8vA5hcwC3IhtNRU9+E9e0EviUjRRfhYF/8ZXMjamWkwZ5sP7jWscctwKBgQDBIyZvRvOGYCVGZBeQfqjIyzoJkVPBco6FsOABGQiuEIf1L0ocDw13/zZhVOV+wkkGHvcEZYs80lOAv0ioBcf+wlFw2JIEXKoJ5xKKqxnGa60mwb8Z9Cpm3NRMKSAQ70UWZ6F7v6iZt24fwfIk5gnDD1xGM4bsHcInwAa3hdI0MwKBgQDKXgPD8VslXHPC6FC6AvNmWuh7PffAagVEDbSBuO71c3uyO8UXDLE6xpm6p80ZpAGhCzkT/gWXYt1UkVugS8eZILz2sY0I6ps6qdZfEZnndZH7lXX9YlKJ/tBGdo0YyvnZriqu2VfALWPqdk6hTOkJFtkQPRr7LniE6+RxWhDr+QKBgQCuJZihW7N3pbfWiafpxRtBumWBfQWtdzLlfz/sHXuDICrHPLWxKS121qtdBeTM8DhSCZen4juzQt7CRzgnMNdNcj9m5hB7WGaF+VHxsSfTjwGY4bgDmfKlv1a5uZdNTcHY2uZzo7RNrmTgw8sn1DhXJsGIFywAOTD5EJ+92S9ZmwKBgQCdq2AFqHGaZAHZuK14HgAcipz9PVsyejdD0AEJYyFcn7lG76U541PpRyb/kQf9yAohbHxB3GRPLdfeuRArBreDvL1MLc2nsxmM/7UkikBa2ghJ3BjiJBogVEofY+r0opulZGg8Ia6+wXLa8bKzyvWvi5T/UKKaUKHjgyeq7z0wPA==";

    // 支付宝公钥,查看地址：https://openhome.alipay.com/platform/keyManage.htm 对应APPID下的支付宝公钥。
    public static String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsb3O1lbGgefyqwD3Qxv6xTgv+Ub0FaRIsVhhMrS4QMD1MB7Hqt4lPnZfBLOIqxmr6tCpFN7M5V7WsTmrDVEvrs5yfUX41eIWAfxFZuU2IJ+nRGwBBgnAw4DknzTVGM6SmaQuAu8eJjGkk1QvGg4RU7tMUPr6Bd37oiMMPiG3vnuy9Fr9a8Mm87Hh5obJ6MyWcm/7ICU6yTqGHYDOqQpyLG4i1E0Pf021hVxU3P4zanWO7pQR9LZsioDRYN+t3tw2DDd+KkbfDxzrW5U09/BvmXKLl60eMw/fL/VoWADEF6UjvbHB6L5TwwDFPOymq++Ga1qFmmaJwWmsDDy3TRRotQIDAQAB";

// 服务器异步通知页面路径  需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
//    	public static String notify_url ="http://localhost:8080/buyGoods";

    // 页面跳转同步通知页面路径 需http://格式的完整路径，不能加?id=123这类自定义参数，必须外网可以正常访问
	public static String return_url = "http://localhost:8080/Alipay/buyGoods";

    // 签名方式
	public static String sign_type = "RSA2";

    // 字符编码格式
	public static String charset = "utf-8";

    // 支付宝网关
	public static String gatewayUrl = "https://openapi.alipaydev.com/gateway.do";

    // 支付宝网关
	public static String log_path = "C:\\";


    /**
     *写日志，方便测试（看网站需求，也可以改成把记录存入数据库）
     * @param sWord
     */
    public static void logResult(String sWord) {
        FileWriter writer = null;
        try {
            writer = new FileWriter(log_path + "alipay_log_" + System.currentTimeMillis()+".txt");
            writer.write(sWord);
        } catch (Exception e) {
            e.printStackTrace();
        } finally {
            if (writer != null) {
                try {
                    writer.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
    }
}

